{% extends "common.html" %}


{% block subtitle_main %}
{% url 'case_view' as case_url %}
    <h3>{{localnav.name}}</h3>
    <ul>
        <li class="active"><a href="#" target="_self">客户案例</a></li>
    </ul>
{% endblock %}



{% block subtitle_local %}
    <div class="c-m-t-path pull-right">当前位置：{{localnav.name}} > {{local_news_value}} • 摩力顿</div>
    <h4>{{localnav.name}}</h4>
{% endblock %}


{% block subtitle_content %}

<div class="c-m-list">
{% for case in page_obj %}
        <div class="c-m-l-first hover_box">
            <div class="c-m-l-f-left pull-left">
               <a href="{{case.url}}" target="_self"> <img src="{{case.img.url}}" title="{{case.name}}" alt="{{case.name}}"/></a>
            </div>
            <div class="c-m-l-f-right pull-right">
                <h4>{{case.name}}</h4>
                    <p>{{case.intro}}</p>
            </div>
        </div>
{% endfor %}

   <div class="c-m-l-pagination">
        <ul>
            <li>共{{paginator.num_pages}}页记录</li>

            {% if page_obj.has_previous %}
                <li><a href="{{ request.path }}?&page={{ page_obj.previous_page_number }}" target="_self">上一页</a></li>
            {%else%}
                <li><a href="#" target="_self">上一页</a></li>
            {% endif %}

            {%for num in page_obj.paginator.page_range %}
                {%if num == page_obj.number %}
                    <li class="active"><a href="#" target="_self">{{num}}</a></li>
                {%else%}
                    <li><a href="{{ request.path }}?page={{ num }}&nav_id={{localnav.id}}" target="_self">{{num}}</a></li>
                {%endif%}
            {%endfor%}

            {% if page_obj.has_next %}
               <li> <a href="{{ request.path }}?page={{ page_obj.next_page_number }}&nav_id={{localnav.id}}" target="_self">下一页</a></li>
            {%else%}
               <li> <a href="#" target="_self">下一页</a></li>
            {% endif %}

        </ul>
    </div>
{% endblock %}
